package com.cmsr.springclond.strategy;


import java.util.HashMap;
import java.util.Map;

public class PayTypeFactory {
    private static Map<String,PayStrategy> payTypeMap=new HashMap<>();

    static {
        payTypeMap.put("1",new PayFactoryByBalance());
        payTypeMap.put("2",new PayFactoryByHuabei());
        payTypeMap.put("3",new PayFactoryByYuEBAO());
    }

    public static PayStrategy getType(String payType){
        return  payTypeMap.get(payType);
    }

}
